import os

try:
    # 打开和本文件同级的 content.log 文件
    file_path = os.path.join(os.path.dirname(__file__), 'content.log')
    with open(file_path, 'r', encoding='utf-8') as f:
        # 读取文件内容
        content = f.read()

        # 按行读取文件内容并打印
        lines = f.readlines()
        for line in lines:
            print(line.strip())
        print(content)
except FileNotFoundError:
    print("未找到 content.log 文件。")
except Exception as e:
    print(f"读取文件时发生错误: {e}")
